﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace DesignPattern.SingletonPattern
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread t1 = new Thread(GetTest);
            Thread t2 = new Thread(GetTest);
            Thread t3 = new Thread(GetTest);
            t1.Start();
            t2.Start();
            t3.Start();
            Console.ReadKey();
        }

        public static void GetTest()
        {
            for (int i = 0; i < 10; i++)
            {
                Singleton.GetInstance().Print();
            }
        }
    }
}
